package com.itheima.controller;

import com.itheima.service.SunService;
import com.itheima.service.UserService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
@Controller
public class SunController {
    //使用@Resource注解注入UserService
    @Resource(name="sunService")
    private SunService sunService;
    public void light(){
        this.sunService.light();
        System.out.println("执行SunController.save()");
    }
}
